package com.lovely602.boot.bootdemo.domain.common.annotation.tx;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Documented
@Retention(RetentionPolicy.RUNTIME)
@Transactional(value = Tx.CONFIG_NAME, propagation = Propagation.REQUIRED,
    rollbackFor = Throwable.class)
public @interface Tx {

  String CONFIG_NAME = "transactionManager";

}
